From 79fb921ffc7d19ba85ca3df966d3317c93b382e6 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 27 Jan 2016 23:30:25 -0500 Subject: [PATCH] spin button: Document sizing peculiarities Document that it is best to explicitly set width-chars and max-width-chars to avoid surprises. https://bugzilla.gnome.org/show_bug.cgi?id=727294 --- gtk/gtkspinbutton.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c index 27f5184018..7961dc9fca 100644 --- a/gtk/gtkspinbutton.c +++ b/gtk/gtkspinbutton.c @@ -81,7 +81,11 @@ * * The main properties of a GtkSpinButton are through an adjustment. * See the #GtkAdjustment section for more details about an adjustment's - * properties. + * properties. Note that GtkSpinButton will by default make its entry + * large enough to accomodate the lower and upper bounds of the adjustment, + * which can lead to surprising results. Best practice is to set both + * the #GtkEntry::width-chars and #GtkEntry::max-width-chars poperties + * to the desired number of characters to display in the entry. * * # CSS nodes * -- 2.30.2